<?php
$sql_banners_dir = mysql_query("SELECT * FROM tbl_banners WHERE exibir > NOW() ORDER BY exibir ");
while($dados_dir = mysql_fetch_array($sql_banners_dir)) {
	?>
	<div class="bloco_logos">
	<?php
	$ext = explode('.',$dados_dir['arquivo']);
	if($ext[1] == 'jpg' || $ext[1] == 'png') {
		list($width, $height, $type, $attr) = getimagesize("../intranet/banners/".$dados_dir['arquivo']."");
		if($dados_dir['link'] != "") {
			print("<a target=\"_blank\" href=\"".$dados_dir['link']."\">
			<img width=\"270\" src=\"../intranet/banners/".$dados_dir['arquivo']."\">
			</a>");
		} else {
			print("<img width=\"270\" src=\"../intranet/banners/".$dados_dir['arquivo']."\" ");
		}
		print("<br>");
	} 
	if($ext[1] == 'swf') {
		list($width, $height, $type, $attr) = getimagesize("../intranet/banners/".$dados_dir['arquivo']."");
		print("
			<object type=\"application/x-shockwave-flash\" >
				<param name=\"movie\" value=\"../intranet/banners/".$dados_dir['arquivo']."\" />
				<param name=\"quality\" value=\"high\" />
			</object>
		");
		print("<br>");
	}
	?>
	</div>        
	<?php
}
?>


